//=============================================================================
//
//   File : qtg_appinstaller.h
//   Creation date : Sab 19 mar 2011 09:31:42 CET by Antonino G.Imbesi
//
//   This file is part of the QtGLauncher distribution
//   Copyright (C) 2011 Antonino G. Imbesi <grifisx at barmes dot org>
//
//   This program is FREE software. You can redistribute it and/or
//   modify it under the terms of the GNU General Public License
//   as published by the Free Software Foundation; either version 2
//   of the License, or (at your opinion) any later version.
//
//   This program is distributed in the HOPE that it will be USEFUL,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//   See the GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program. If not, write to the Free Software Foundation,
//   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
//=============================================================================

#ifndef QTG_APPINSTALLER_H
#define QTG_APPINSTALLER_H

#include <QWizard>
#include <QWizardPage>
#include <QSettings>

class qtg_pathselectionwizard;
class qtg_qpushbutton;
class QLineEdit;
class QString;
class QTextEdit;
class QScrollBar;
class QTimerEvent;
class QSettings;
class QComboBox;
class QXmlStreamReader;
class QXmlStreamWriter;


class qtg_appinstaller : public QWizard
{

public:
    explicit qtg_appinstaller(QWidget *parent = 0, QSettings *settings = new QSettings);
    ~qtg_appinstaller();
    QSettings *m_appConf;
signals:

public slots:

};

/************************************
/-Class--------Folder selector page:-
************************************/

class qtg_pathselectionwizard : public QWizardPage
{
    Q_OBJECT
public:
    explicit qtg_pathselectionwizard(qtg_appinstaller *parent = 0);
    ~qtg_pathselectionwizard();
    void cpDir(QString &, QString &);
    QLineEdit *m_pPathLine;
    QTextEdit *m_pTextCopyEdit;
    QScrollBar *m_psbTextCopyEdit;
    qtg_qpushbutton *m_pOkBtn;
    QString m_szSourceDir;
    QString m_szDestDir;
signals:

public slots:
    void startCopy();
    void registerPath();


};


/************************************
/-Class-Bin and Icon selector page: -
************************************/

class qtg_binselectionwizard : public QWizardPage
{
    Q_OBJECT
public:
    explicit qtg_binselectionwizard(qtg_appinstaller *parent = 0);
    ~qtg_binselectionwizard();
    QLineEdit *m_pBinPathLine;
    QLineEdit *m_pIconPathLine;
    QLineEdit *m_pParamsLine;
signals:

public slots:
    void registerBinPath();
    void registerIconPath();

};



/************************************
/-Class-Category selector page: -
************************************/

class qtg_categoryselectionwizard : public QWizardPage
{
    Q_OBJECT
public:
    explicit qtg_categoryselectionwizard(qtg_appinstaller *parent = 0);
    ~qtg_categoryselectionwizard();
    QLineEdit *m_pCategoryLine;
    QComboBox *m_pComboCategory;
    QXmlStreamReader *m_pXmlStream;

signals:

public slots:
    void registerCategory(const QString);
    bool xmlreadNextStartElement();
    void xmlskipCurrentElement();
};



/************************************
/-Class-Final page xml writer: -
************************************/

class qtg_finalpagewizard : public QWizardPage
{
    Q_OBJECT
public:
    explicit qtg_finalpagewizard(qtg_appinstaller *parent = 0);
    ~qtg_finalpagewizard();
    QXmlStreamWriter *m_pXmlStream;

signals:

public slots:
    void registerCat();
};


#endif // QTG_APPINSTALLER_H
